package com.cn.aam.checaiduo.ui.arouter.section;

import android.content.Context;

import com.alibaba.android.arouter.launcher.ARouter;
import com.cn.aam.checaiduo.Const;
import com.cn.aam.checaiduo.bean.other.BasicUserInfoB;
import com.cn.aam.checaiduo.ui.arouter.UIRouter;
import com.cn.aam.checaiduo.ui.more.HelpCenterDetailIActivity;
import com.cn.aam.checaiduo.ui.more.JustShowImageActivity;

/**
 * @author 艹羊
 * @project Checaiduo_Android
 * @date 2017/8/14 下午2:14
 * @description
 */

public class RouterMore {


    private RouterMore() {
    }

    public static RouterMore getInstance() {
        return RouterMore.Holder.INSTANCE;
    }

    private static class Holder {
        static RouterMore INSTANCE = new RouterMore();

    }


    //认证第二步
    public void openAuthStep2Page(Context context, String url, String title) {
        ARouter.getInstance().build(UIRouter.MORE.AUTH_STEP02)
                .withString(Const.TARGET_URL, url)
                .withString(Const.TARGET_TITLE, title)
                .navigation(context);
    }


    //打开实名认证，结果页面
    public void openAuthResultPage(Context context, BasicUserInfoB basicUserInfo) {
        ARouter.getInstance().build(UIRouter.MORE.AUTH_RESULT)
                .withSerializable("data_basic_user", basicUserInfo)
                .navigation(context);
    }


    //打开修改手机第1步
    public void openChangeMobileStep01(Context context, String mobile) {
        ARouter.getInstance().build(UIRouter.MORE.CHANGE_MOBILE_STEP1)
                .withString("data_mobile", mobile)
                .navigation(context);
    }

    //打开修改手机第2步
    public void openChangeMobileStep02(Context context, String mobile) {
        ARouter.getInstance().build(UIRouter.MORE.CHANGE_MOBILE_STEP2)
                .withString("data_old_mobile", mobile)
                .navigation(context);
    }

    //打开帮助中心子列表
    public void openSubHelpCenter(Context context, HelpCenterDetailIActivity.LESSON lessson) {
        ARouter.getInstance().build(UIRouter.MORE.SUB_HELP_CENTER)
                .withSerializable("data_help_lesson", lessson)
                .navigation(context);
    }

    //打开帮助中心子列表
    public void openJustShowImagePage(Context context, JustShowImageActivity.ImgDispatch imgDispatch) {
        ARouter.getInstance().build(UIRouter.MORE.JUST_SHOW_IMAGE)
                .withSerializable("data_img_dispatch", imgDispatch)
                .navigation(context);
    }

}
